package com.itheima.day06.ZuoYe.ZuoYe4;

public class TestZhengZe {
    public static void main(String[] args) {
        String phonenum = "1[3-9][0-9]{9}";
        String str = "1801234a678";
        boolean result = str.matches(phonenum);
        System.out.println(result);
        System.out.println("---------------------------------");
        String email = "\\w+@\\w+\\.\\w+";
        String str1 = "123@qq.com";
        boolean result1 = str1.matches(email);
        System.out.println(result1);
        System.out.println("---------------------------------");
        String time = "\\d{4}+年+\\d{2}+月+\\d{2}+日";
        String str2 = "2025年07月11日";
        boolean result2 = str2.matches(time);
        System.out.println(result2);
    }
}
